package com.shasselclub.common.constant;

/**
 * 自定义请求状态码
 * @author ScienJus
 * @date 2015/7/15.
 */
public enum ResultStatus {
        SUCCESS(1, "成功"),
        MOBILE_ISNOTNULL(2037,"手机号码不能为空"),
        MOBILE_ERROR(2038,"手机号码格式错误"),
        MOBEILE_ERROR(1004, "手机号码格式错误"),
    TOKEN_NOTNULL(10051, "token不能为空"),
    TOKEN_WUXIAO(10052, "token无效"),
    NOT_FOUND(404, "NOT FOUND"),
    CODE_ERROR(1008, "验证码错误"),
    CODE_NOTNULL_ERROR(10081, "验证码不能为空"),
    AUTH_ERROR_24(1065, "您的操作过于频繁,请24小时后再试"),
    AUTH_ERROR_1(1066, "您的操作过于频繁,请1分钟后再试"),
    NO_AUTH_ERROR_1(1067, "无权访问"),
    CODE_SEND_SUCCESS(0, "验证码发送成功"),
    CODE_SUCCESS(1046, "验证码正确"),
    PARAM_IS_NOT_NULL(1006, "PARAM IS NOT NULL"),
        ERROR(-1, "错误")
   ;

    /**
     * 返回码
     */
    private int code;

    /**
     * 返回结果描述
     */
    private String message;

    ResultStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
